package test01.demo06;

/**
 * @author CSY
 * @date 2025 - 04 - 09
 */
public class MainTest02 {
    public static void main(String[] args) {
        //根据枚举常量名称，返回枚举实例
        Color red = Color.valueOf("RED");
        Color blue = Enum.valueOf(Color.class,"BLUE");

        System.out.println(red.getValue());
        System.out.println(blue.getValue());
    }
}
